package cn.cvs.service.supplier;


import cn.cvs.pojo.Supplier;

import java.util.List;

public interface SupplierService {
    /**
     * 查询供应商列表
     *
     * @param pageIndex
     * @param pageSize
     * @param querySupCode
     * @param querySupName
     * @return
     * @throws Exception
     */
    List<Supplier> findAllSupplier(Integer pageIndex, Integer pageSize, String querySupCode, String querySupName) throws Exception;

    /**
     * 添加供应商
     *
     * @param supplier
     * @return
     * @throws Exception
     */
    boolean addSupplier(Supplier supplier) throws Exception;


    /**
     * 通过id获取供应商对象
     *
     * @param id
     * @return
     * @throws Exception
     */
    Supplier findSupplierById(String id) throws Exception;

    /**
     * 获取供应商总数量
     *
     * @return
     * @throws Exception
     */
    Integer totalCount(String querySupCode, String querySupName) throws Exception;

    /**
     * 修改供应商信息
     *
     * @param supplier
     * @return
     * @throws Exception
     */
    boolean updateSupplier(Supplier supplier) throws Exception;


    /**
     * 获取所有供应商信息
     *
     * @return
     * @throws Exception
     */
    List<Supplier> findAllSupplier() throws Exception;

    /**
     * 删除供应商
     *
     * @param id
     * @return
     * @throws Exception
     */
    boolean deleteSupplier(String id) throws Exception;
}
